﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PBOffice.Models;
using PBOffice.DAL;

namespace PBOffice.BLL
{
    public class MsgToUserManager
    {
        public List<MessageToUser> GetAllMsgToUserByMsgId(int id)
        {
            return new MsgToUserService().GetAllMsgToUserByMsgId(id);
        }
        public List<MessageToUser> GetAllMsgToUserByUserId(string userId)
        {
            return new MsgToUserService().GetAllMsgToUserByUserId(userId);
        }
        public void AddMessageToUser(MessageToUser touser)
        {
            new MsgToUserService().AddMessageToUser(touser);
        }
        public void DeleteMessageToUserByMessageId(int id)
        {
            new MsgToUserService().DeleteMessageToUserByMessageId(id);
        }
        public int GetCountMsgToUserByToUserId(string name)
        {
            return new MsgToUserService().GetCountMsgToUserByToUserId(name);
        }
        public int GetCountMsgToUserByToUserIdAndIfRead(string name)
        {
            return new MsgToUserService().GetCountMsgToUserByToUserIdAndIfRead(name);
        }
        public void DeleteMsgToUserByToUserIdAndMsgId(int id, string name)
        {
            new MsgToUserService().DeleteMsgToUserByToUserIdAndMsgId(id, name);
        }
    }
}
